<template>
	<view class="waitingList_container">
		<view class="" style="height: 160rpx;">
		<view class="mail_List fixed z_ninetynine">
			<view class="mail" style="font-weight: 700;">
				<view class="order">巡更详情</view>
			</view>
		</view>
		<view class="icon fixed z_ninetynine">
			<u-icon name="arrow-left" color="#fefefe" size="40" @click="navigateBack"></u-icon>
		</view>
			
		</view>
		<!-- 执行信息 -->
		<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;" v-if="current==1">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">执行信息</text>
		</view>
		<!-- 执行信息1 -->
		<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;" v-if="current==2">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">执行信息1</text>
		</view>
		<view class="card" style="position: relative; padding: 0 42rpx;">
			<u-form :model="form" ref="uForm">
				<u-form-item label="执行人:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="刘备"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="执行状态:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="待执行"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="接单时间:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;"
						placeholder="2021-06-09 11: 45: 34" :clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="执行时间:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="-"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<image src="/static/workOrder/Group805.png" mode=""
					style=" position: absolute;top: 20rpx; left: 236rpx; width: 280rpx; height: 280rpx;">
				</image>
			</u-form>
		</view>
		<!-- 执行信息2 -->
		<view class="" v-if="current==2">
			<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;">
				<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
					style="font-weight: 700; font-size: 30rpx;">执行信息2</text>
			</view>
			<view class="card" style="position: relative; padding: 0 42rpx;">
				<u-form :model="form" ref="uForm">
					<u-form-item label="执行人:">
						<u-input v-model="form.Reporter"
							placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="孙权"
							:clearable="false" :disabled="true" />
					</u-form-item>
					<u-form-item label="执行状态:">
						<u-input v-model="form.address"
							placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="state==false ? '待接单' : '完成' "
							:clearable="false" :disabled="true" />
					</u-form-item>
					<!-- 点击确定后新增加的内容 -->
					<view class="" v-if="added==2&&current==2">
						<u-form-item label="接单时间:">
							<u-input v-model="form.address"
								placeholder-style="color: #000; text-align: right; font-weight: 600;"
								placeholder="2021-06-09 11: 45: 34" :clearable="false" :disabled="true" />
						</u-form-item>
						<u-form-item label="执行时间:"> 
							<u-input v-model="form.address"
								placeholder-style="color: #000; text-align: right; font-weight: 600;"
								placeholder="2021-06-09 11: 50: 54" :clearable="false" :disabled="true" />
						</u-form-item>
						<u-form-item label="完成时间:">
							<u-input v-model="form.address"
								placeholder-style="color: #000; text-align: right; font-weight: 600;"
								placeholder="2021-06-09 15: 55: 32" :clearable="false" :disabled="true" />
						</u-form-item>
						<u-form-item label="异常:">
							<u-input v-model="form.address"
								placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="2处"
								:clearable="false" :disabled="true" />
						</u-form-item>
						<image src="/static/workOrder/Group690.png"
							style=" position: absolute;top: 210rpx; left: 236rpx; width: 280rpx; height: 280rpx;">
						</image>
					</view>
				</u-form>
			</view>
		</view>
		<!-- 巡更信息 -->
		<view class="data_Statistics" style="padding: 28rpx 24rpx 0 ;">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">巡更信息</text>
		</view>
		<view class="card" style="padding: 0 42rpx;">
			<u-form :model="form" ref="uForm">
				<u-form-item label="巡更路线名称:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="访春园巡更路线"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="路线有效时间:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;"
						placeholder="2021-06-09 12: 00: 00" :clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="路线失效时间:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;"
						placeholder="2021-06-09 16: 00: 00" :clearable="false" :disabled="true" />
				</u-form-item>
				<!-- <u-form-item label="巡更频率:"> -->
				<view class="frequency">
					<text style="line-height: 67rpx;">巡更频率:</text>
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;"
						placeholder="120分钟巡更一次，允许超时10分钟。" :clearable="false" :disabled="true" />
				</view>
				<!-- </u-form-item> -->
				<u-input v-model="form.address" placeholder-style="color: #000; text-align: right; font-weight: 600;"
					placeholder="12: 00: 00 至 14: 00: 00" :clearable="false" :disabled="true" />
				<u-input v-model="form.address" placeholder-style="color: #000; text-align: right; font-weight: 600;"
					placeholder="14: 00: 00 至 16: 00: 00" :clearable="false" :disabled="true" />
				<view class="example">
					<text style="font-size: 24rpx;flex: 1; color: #ccc;">例如:</text>
					<view style="flex: 6;font-size: 24rpx; color: #ccc;">60分钟巡更一次，允许超时10分钟，即巡更总时长为60分钟,前50分钟为正常，后10分钟为超时
					</view>
				</view>
				<u-form-item label="打卡规则:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="顺序"
						:clearable="false" :disabled="true" />
				</u-form-item>
			</u-form>
		</view>
		<!-- 巡更路线信息 -->
		<view class="order_Allocation">
			<view class="data_Statistics" style="padding: 28rpx 24rpx 0 ;">
				<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
					style="font-weight: 700; font-size: 30rpx;">巡更路线信息</text>
			</view>
			<view class="card" style="position: relative; padding: 0 42rpx;">
				<u-form :model="form" ref="uForm">
					<!-- 巡更点1 -->
					<u-form-item label="巡更点1:" label-position="top">
						<view class="name" style="display: flex;">
							<text>巡点名称: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元门禁" :clearable="false" :disabled="true" />
						</view>
						<view class="position" style="display: flex;">
							<text>蓝牙位置: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元玄关处" :clearable="false" :disabled="true" style="flex: 2;" />
						</view>
						<view class="points" style="display: flex;">
							<text>巡更要点: </text>
							<view class="main" style="margin-left: 20rpx; flex: 2;">
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="1、访春园Y20#-1单元门口是否清洁干净" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="2、访春园Y20#-1单元门口围栏是否破损" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="3、访春园Y20#-1单元门口植物是否伸出" :clearable="false" :disabled="true" />
							</view>
						</view>
						<view class="position" style="display: flex;" v-if="added==2">
							<text>异常: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 75rpx; font-size: 25rpx; " placeholder="无"
								:clearable="false" :disabled="true" style="flex: 2;" />
						</view>
					</u-form-item>
					<!-- 巡更点2 -->
					<u-form-item label="巡更点2:" label-position="top">
						<view class="name" style="display: flex;">
							<text>巡点名称: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元门禁" :clearable="false" :disabled="true" />
						</view>
						<view class="position" style="display: flex;">
							<text>蓝牙位置: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元玄关处" :clearable="false" :disabled="true" style="flex: 2;" />
						</view>
						<view class="points" style="display: flex;">
							<text>巡更要点: </text>
							<view class="main" style="margin-left: 19rpx; flex: 2;">
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="1、访春园Y20#-1单元至2单元道路植物是否伸出" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="2、访春园Y20#-1单元至2单元道路植物是否伸出" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="3、访春园Y20#-1单元至2单元道路植物是否伸出" :clearable="false" :disabled="true" />
							</view>
						</view>
						<view class="points" style="display: flex;" v-if="added==2">
							<text>异常: </text>
							<view class="main" style="margin-left: 75rpx; flex: 2;">
								<view class="damage" style="display: flex; justify-content: space-between;">
									<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
										placeholder="1、过道损坏" :clearable="false" :disabled="true" />
								</view>
								<view class="collapse" style="display: flex; justify-content: space-between;">
									<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
										placeholder="2、围墙倒塌" :clearable="false" :disabled="true" />
								</view>
							</view>
						</view>
					</u-form-item>
					<!-- 巡更点3 -->
					<u-form-item label="巡更点3:" label-position="top">
						<view class="name" style="display: flex;">
							<text>巡点名称: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元门禁" :clearable="false" :disabled="true" />
						</view>
						<view class="position" style="display: flex;">
							<text>蓝牙位置: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元玄关处" :clearable="false" :disabled="true" style="flex: 2;" />
						</view>
						<view class="points" style="display: flex;">
							<text>巡更要点: </text>
							<view class="main" style="margin-left: 22rpx; flex: 2;">
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="1、访春园Y20#-1单元门口是否清洁干净" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="2、访春园Y20#-1单元门口围栏是否破损" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="3、访春园Y20#-1单元门口植物是否伸出" :clearable="false" :disabled="true" />
							</view>
						</view>
						<view class="position" style="display: flex;" v-if="added==2">
							<text>异常: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 75rpx; font-size: 25rpx; " placeholder="无"
								:clearable="false" :disabled="true" style="flex: 2;" />
						</view>
					</u-form-item>
					<!-- 巡更点4 -->
					<u-form-item label="巡更点4:" label-position="top">
						<view class="name" style="display: flex;">
							<text>巡点名称: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元门禁" :clearable="false" :disabled="true" />
						</view>
						<view class="position" style="display: flex;">
							<text>蓝牙位置: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 20rpx; font-size: 25rpx; "
								placeholder="访春园Y20#-1单元玄关处" :clearable="false" :disabled="true" style="flex: 2;" />
						</view>
						<view class="points" style="display: flex;">
							<text>巡更要点: </text>
							<view class="main" style="margin-left: 20rpx; flex: 2;">
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="1、访春园Y20#-1单元门口是否清洁干净" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="2、访春园Y20#-1单元门口围栏是否破损" :clearable="false" :disabled="true" />
								<u-input v-model="form.describe" placeholder-style="color: #000; font-size: 25rpx; "
									placeholder="3、访春园Y20#-1单元门口植物是否伸出" :clearable="false" :disabled="true" />
							</view>
						</view>
						<view class="position" style="display: flex;" v-if="added==2">
							<text>异常: </text>
							<u-input v-model="form.describe"
								placeholder-style="color: #000; margin-left: 75rpx; font-size: 25rpx; " placeholder="无"
								:clearable="false" :disabled="true" style="flex: 2;" />
						</view>
					</u-form-item>
				</u-form>
			</view>
		</view>
		<!-- 按钮 -->
		<view class="button" v-if="btn==1">
			<u-button type="primary" style="flex: 1;" @click="resolved">接单</u-button>
			<u-button type="success" style="flex: 1;" @click="Approved">转交</u-button>
		</view>
		<view class="button" v-if="btn==2">
			<u-button type="primary" style="flex: 1;" @click="cancel">取消</u-button>
			<u-button type="success" style="flex: 1;" @click="determine">确定</u-button>
		</view>
		<!-- 弹出框 -->
		<u-popup v-model="show" mode="center" width="626rpx" height="430rpx" border-radius="20">
			<view
				style="height: 54rpx; line-height: 54rpx; font-weight: 600; color: #a1a1a1; background-color: #fbfbfb; text-align: center;">
				工单提示</view>
			<view class="work_Order">
				<view class="work_Order_top"></view>
				<view class="work_Order_bottom" style="margin-top: 10rpx;">催促工单成功！</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// form表单
				form: {
					Reporter: '',
					title: '',
					address: '',
					describe: '',
					chargePerson: '',
					Executor: '',
					Maintenance: '',
					end: ''
				},
				// 演示地址，请勿直接使用
				action: 'http://www.example.com/upload',
				show: false,
				// 控制执行信息1和执行信息2是否显示
				current:1,
				// 控制按钮的隐藏与显示
				btn:1,
				// 点击确定新增的内容
				added:1,
				// 点击确定后的执行状态
				state:false
			}
		},
		methods: {
			// 接单按钮
			resolved() {
				// this.show = true
			},
			// 转交按钮
			Approved() {
				this.current=2,
				this.btn=2
			},
			// 取消按钮
			cancel() {
				this.current=1,
				this.btn=1
			},
			// 确定按钮
			determine() {
				this.added=2
				this.btn=3,
				this.state=true
			}
		}
	}
</script>

<style lang="scss" scoped>
	.waitingList_container {
		.mail_List {
			overflow: hidden;
			width: 100%;
			background-color: #f2f2f2;

			.mail {
				padding: 10rpx 0;
				// margin-top: 96rpx;
				color: #999999;
				font-size: 40rpx;
				background-color: #e5e5e5;
			}

			.order {
				text-align: center;
			}
		}

		/deep/.card {
			.u-form-item--left {
				flex: unset !important;
				width: unset !important;
			}

			.frequency {
				display: flex;

				// justify-content: space-between;
				u-input {
					flex: 2;
				}
			}

			.example {
				display: flex;
				margin-left: 67rpx;
			}

			.u-form-item--right {
				margin-left: 31rpx;
			}
		}

		.icon {
			position: absolute;
			top: 18rpx;
			// top: 114rpx;
			left: 20rpx;
		}

		.second_card {
			.u-cell {
				padding: 18rpx 32rpx;

				/deep/.u-cell__value {
					color: #333333;
					font-weight: 600;
				}
			}

			/deep/.uni-card__content {
				padding: 16rpx 24rpx;
			}
		}

		/deep/button {
			border-radius: unset !important;
		}

		.uni-border[data-v-19622063]:after {
			border: unset;
		}

		/deep/.uni-border.data-v-19622063:after {
			border: unset;
		}

		.slot-btn__hover {
			background-color: rgb(235, 236, 238);
		}

		.button {
			display: flex;
			// position: fixed;
			// left: 0;
			// right: 0;
			// bottom: 0;
			margin-top: 200rpx;
			border-radius: 14rpx;
			overflow: hidden;
			z-index: 9;

			.u-btn {
				border-radius: unset;
			}
		}

		.work_Order {
			margin-top: 60rpx;
			text-align: center;

			.work_Order_top {
				width: 168rpx;
				height: 168rpx;
				margin: 0 auto;
				background-color: #e5e5e5;
				border-radius: 50%;
			}
		}
	}
</style>
